package com.xiaoyilin.controller;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class FanoutController {


    @Autowired
    private AmqpTemplate amqpTemplate;

    @GetMapping("/fanout/send")
    public void sender() {
        amqpTemplate.convertAndSend("my.fanout.exchange", "", "fanout-queue-msg");
    }


}
